<?php

$roundId;

$db = mysql_connect('localhost', 'kattilam_test', 'test') or die ('Unable to connect to DB!!');
mysql_select_db('kattilam_discgolfmobile', $db) or die (mysql_error($db));

$query1 = 'SELECT MAX(id) FROM round';
$result1 = mysql_query($query1, $db) or die (mysql_error($db));

while ($row = mysql_fetch_array($result1)) {
  extract($row);
  $roundId = $row[0];
  }

$notesQuery = 'UPDATE round SET notes = "' . $_REQUEST['notes'] . '" WHERE id = ' . $roundId . '';
mysql_query($notesQuery, $db) or die (mysql_error($db));  

?>